/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * Project Name: lmrp-android app
 * Create Time: 16-2-16 下午6:41
 */

package com.lenovo.mso2o.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by lit on 2015/11/12.
 * 广告类
 * ImageUrl 图片路径
 * LinkUrl  跳转链接
 */
public class Advertisement implements Parcelable {

    private String ImageUrl;
    private String LinkUrl;

    protected Advertisement(Parcel in) {
        ImageUrl = in.readString();
        LinkUrl = in.readString();
    }

    public static final Creator<Advertisement> CREATOR = new Creator<Advertisement>() {
        @Override
        public Advertisement createFromParcel(Parcel in) {
            return new Advertisement(in);
        }

        @Override
        public Advertisement[] newArray(int size) {
            return new Advertisement[size];
        }
    };

    public String getImageUrl() {
        return ImageUrl;
    }

    public void setImageUrl(String imageUrl) {
        ImageUrl = imageUrl;
    }

    public String getLinkUrl() {
        return LinkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        LinkUrl = linkUrl;
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class Order {\n");
        sb.append("img:").append(ImageUrl).append("\n");
        sb.append("url:").append(LinkUrl).append("\n");
        sb.append("}\n");
        return sb.toString();
    }
    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(ImageUrl);
        dest.writeString(LinkUrl);
    }
}
